package com.zxt.manager;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zxt.mapper.SysUserMapper;
import com.zxt.security.bean.SysUser;
import com.zxt.security.service.SecurityUserService;
import org.springframework.stereotype.Service;

@Service
public class SysUserManager extends ServiceImpl<SysUserMapper, SysUser> implements SecurityUserService {

    @Override
    public SysUser getByUsername(String username) {
        LambdaQueryWrapper<SysUser> wrapper = SysUser.gw();
        wrapper.eq(SysUser::getUserName, username);
        return getOne(wrapper);
    }
}
